package com.zs.backend.common.enumeration;

import java.util.Objects;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 订单打款审核状态（0：未审核;1：审核通过，2：审核不通过）
 */
@Getter
@AllArgsConstructor
public enum OrderAuditingStatus {

    NO_AUDITING(0, "未审核"),
    PASS(1, "审核通过"),
    UN_PASS(2, "审核不通过");

    private Integer code;
    private String desc;

    public static OrderAuditingStatus valueOf(Integer value) {
        for (OrderAuditingStatus orderLogType : values()) {
            if (Objects.equals(orderLogType.code, value)) {
                return orderLogType;
            }
        }
        return null;
    }
}
